<template>
    <div class="tabs">
        <el-tabs
            v-model="store.active"
            type="card"
            editable
            class="demo-tabs"
            @tab-change="change"
        >
            <el-tab-pane

            v-for="item in store.navs"
            :key="item.name"
            :label="item.title"
            :name="item.name"
            >
            </el-tab-pane>
            </el-tabs>
    </div>
</template>
<script setup lang="ts">
import {useRouter} from "vue-router"
const router=useRouter()

import {rightStore} from "@/stores/rights.ts"
const store=rightStore()

const change=(name)=>{
    router.push(name)
}
</script>
<style>
    .tabs{
        height:50px;
        background: #18bc9a;
        line-height:50px;
    }
</style>
